function dateFtt(b,a){var c={"M+":a.getMonth()+1,"d+":a.getDate(),"h+":a.getHours(),"m+":a.getMinutes(),"s+":a.getSeconds(),"q+":Math.floor((a.getMonth()+3)/3),S:a.getMilliseconds()};/(y+)/.test(b)&&(b=b.replace(RegExp.$1,(a.getFullYear()+"").substr(4-RegExp.$1.length)));for(var d in c)(new RegExp("("+d+")")).test(b)&&(b=b.replace(RegExp.$1,1==RegExp.$1.length?c[d]:("00"+c[d]).substr((""+c[d]).length)));return b};
function datedifference(a, b) {
	a = Date.parse(a);
	b = Date.parse(b);
	return Math.floor(Math.abs(b - a) / 864E5)
};
function utime_date(ctime){
	return dateFtt("yyyy-MM-dd hh:mm:ss", new Date(ctime * 1000))
}
function time2str(ctime){
	return dateFtt("yyyy-MM-dd hh:mm:ss", new Date(ctime))
}